#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
//时钟编程 alarm()
void wakeUp()
{
  printf("please wakeup!!\n");
}

int main(void) 
{
  printf("you have 4 s sleep!\n");
  signal(SIGALRM,wakeUp);
  alarm(4);
  //将进程挂起
  pause();
  printf("good morning!\n");
 
  return EXIT_SUCCESS;
}
